home *** CD-ROM | disk | FTP | other *** search
-
-
- (Public Domain)
-
- Signal Processing Packages (SPP) and Notebooks 2.72
- for
- Mathematica Version 1.2 and higher
-
- by
-
- Brian Evans, James McClellan, Kevin West,
- Wallace McClure, Lina Karam, and James Proctor
-
- Digital Signal Processing Laboratory
- School of Electrical Engineering
- Georgia Institute of Technology
- Atlanta, GA 30332-0250
-
- evans@eedsp.gatech.edu
-
-
- ---> Introduction
-
- This is an unsupported release of Mathematica code for symbolic
- signal processing copyrighted by The Georgia Tech Research Foundation. Once
- installed (see below), this collection of Mathematica packages can be
- loaded by any user. Bundled with the packages are many Notebooks. Those
- that are tutorials are: AnalogFilters, DTFT, PiecewiseConvolution, and
- zTransform (in three parts). The other Notebooks serve as on-line help:
- EducationalTool, LaPlaceTest, README, SignalProcessingExamples, Signal-
- ProcessingIntroduction, and SignalProcessingUsage. They demonstrate the
- abilities of these packages. A complete set of references is given at the
- end of this file.
-
-
- ---> Index of Files
-
- The files that contain a complete set of the signal processing
- packages and Notebooks for Mathematica are:
-
- SigProc2.0.tar.Z compressed tar file for Unix systems
- SigProc2_IBM_PC.zip zip file for the IBM PC running MS-DOS
- SigProc2.0.mac.sea.hqx binhexed self-extracting archive for Mac
-
- Please transfer these files as binary files. In the case of the IBM PC
- version, the release was loaded on to a PC, zipped, and reloaded on the
- FTP site. All of the file names have been truncated so that they are
- unique. In the case of the Mac version, the release was loaded on to a
- Macintosh--- the files were then converted to Mathematica format and
- archived using Compact Pro 3.1 into one self-extracting archive. The self-
- extracting archive was then run through BinHex 4.0 and put on the FTP site.
- Other files of interest are:
-
- CHANGES text file documenting changes in code
- README this text file
- StanfordNotebooks.tar.Z Notebooks from CCRMA at Stanford (see
- "Related Archive Sites Below")
- VERSION-x.xx indicates the FTP site has version x.xx
- c-src.tar a tar file of useful C programs
- math.el configuration file for Emacs so that
- Emacs becomes a front-end to Mathematica
- usage.ps PostScript version of the reference guide
- usage.tex TeX version of the reference guide
- usersguide.ps PostScript version of the user's guide
- usersguide.tex TeX version of the user's guide
-
-
- --> Installation on an IBM PC
-
- After downloading "SigProc2.zip", move the zip file to a directory
- other than the one in which Mathematica is installed. Then, type
-
- ms-dos> unzip -d SigProc2.zip
-
- You can see all of the possible options for unzip by typing just "unzip".
- If your machine cannot find "unzip", try "pkunzip". If that fails, then
- acquire a copy of "unzip" (which is in the public domain) or "pkunzip"
- (which is shareware). The unzipped archive will produce a Packages and
- a Notebooks directory. You will need to edit Mathematica's "init.m" to add
- the new directory to Mathematica's $Path variable. The command to do this
- is "$Path = Append[$Path, <new_path>]" where <new_path> is the new direc-
- tory path surrounded by double quotes.
-
-
- ---> Installation on a NeXT Machine
-
- Move the file "SigProc2.0.tar.Z" into a temporary directory. Then
- evaluate the Unix commands "uncompress SigProc2.0.tar.Z" and then "tar xf
- SigProc2.0.tar". It will create a Packages and a Notebooks directory. To
- move them to a standard place, type the following Unix commands:
-
- NeXT-Unix> cp -r Packages /LocalLibrary/Mathematica
- NeXT-Unix> cp -r Notebooks /LocalLibrary/Mathematica
-
- The SPP will be in /LocalLibrary/Mathematica/Packages/SignalProcessing and
- the SP Notebooks will be /LocalLibrary/Mathematica/Notebooks in the sub-
- directories Handouts, Help, and Tutorials.
-
-
- --> Installation on a Unix Workstation Other Than a NeXT
-
- Move the file "SigProc2.0.tar.Z" into a temporary directory. Then
- evaluate the Unix commands "uncompress SigProc2.0.tar.Z" and then "tar xf
- SigProc2.0.tar". It will create a Packages and a Notebooks directory. To
- move them to a standard place, type the following Unix commands:
-
- Unix> cp -r Packages /usr/local/math
-
- If you cannot write to /usr/local/math, then put the packages in another
- directory and edit Mathematica's "init.m" file to add the new directory to
- Mathematica's $Path variable by saying "$Path = Append[$Path, <new_path>]"
- where <new_path> is the new directory.
- Once there is a Notebook reader under X Windows, then you can move
- the Notebooks to a "standard" place by evaluating
-
- Unix> cp -r Notebooks /usr/local/math
-
- Otherwise, you can discard the Notebooks (for documentation, refer to the
- TeX files "usage.tex" and "usersguide.tex".
-
-
- ---> Installation on a Macintosh
-
- Download "SigProc2.0.mac.sea.hqx" to your Macintosh in a temporary
- directory. Run BinHex 4.0 on it (with the Text Filter option disabled) to
- produce "SigProc2.0.mac.sea" which is a self-extracting archive. Now,
- double click on the .sea file, and it will produce a Packages and Notebooks
- folder. Move the SignalProcessing folder in the Packages folder to Mathe-
- matica's Packages folder. You can keep the Notebooks anywhere you want such
- as in one of the Mathematica folders. Also, please see the note below.
-
-
- ---> Macintosh Users
-
- Please let Mathematica allocate as much memory as possible. I give
- it 8000 kb. You can check the value by clicking once on the Mathematica
- icon and select the Get Info option from the Finder's File menu. It is the
- number that appears in the lower left-hand corner of the info window.
- If you are using Mathematica 1.2, please make sure that the start
- up procedure includes the loading of the Elliptic functions, symbolic inte-
- gration, and Series packages.
-
-
- ---> Warning
-
- A warning about opening some Notebooks under Mathematica 2.0. The
- signal processing Notebooks are appear in their ASCII form. The binary side
- information like graphic bit maps are not included so Mathematica will have
- to regenerate them from the ASCII Notebook. In Mathematica 2.0 and higher,
- the Notebook will generate all missing bit maps for graphics contained in
- a Notebook, and it will inform the user by saying "Rendering ..." in the
- header of the window containing the Notebook. Each bitmap roughly adds 20
- kb to the memory required by the Notebook. Some Notebooks will double and
- triple in size. Under Mathematica 1.2, it only generates missing bit maps
- as needed (i.e., when you want to see the picture).
-
-
- ---> Related Archive Sites
-
- An additional set of related Notebooks is available in the same
- anonymous FTP site (gauss.eedsp.gatech.edu or IP # 130.207.226.24) in the
- compressed tar file "StanfordNotebooks.tar.Z" (which is also available for
- the PC in zip form as well). These three Notebooks investigate the use of
- windows in masking data and designing filters.
- Another set of Notebooks that describe cochlear signal processing
- and analog filter design, written by Malcolm Slaney, are available from
- Apple Inc. via anonymous FTP to ftp.apple.com. They are available free of
- charge by sending e-mail to corp.lib@applelink.apple.com which comes with
- a hard copy version.
- The Mathematica Special Interest Group runs a very large FTP site
- at yoda.physics.unc.edu (IP #128.109.180.137). It does contain the Note-
- books written by Malcolm Slaney as well as a version of the signal pro-
- cessing packages and Notebooks.
- A set of controls packages have been developed based on the signal
- processing packages. Accompanying the set of controls packages is a set
- of Notebooks that follow Ogata's 1991 textbook "Modern Control Theory".
- COSYPAK and COSYNOTES are available via anonymous FTP to veda.esys.cwru.edu
- (IP #129.22.40.9).
-
-
- ---> Getting started
-
- The Mathematica file "Master.m" loads in all the necessary files
- under Mathematica 1.2 but only tells Mathematica 2.0 where to find all of
- the new routines. Load it in by Needs["SignalProcessing`Master`"].
- The one-dimensional/two-dimensional signal analyzing functions
- DSPAnalyze and ASPAnalyze are good examples of the code's ability to
- switch between symbolic, numeric, and graphical representations (the
- hooks being provided by Mathematica). The four symbolic transform objects
- ZTransform, InvZTransform, InvLaPlace, and LaPlace demonstrate their
- ability to handle multidimensional transforms and the region of conver-
- gence. (The other transform objects are CTFTransform, InvCTFTransform,
- DFTransform, InvDTFTransform, DTFTransform, and InvDTFTransform.) All of
- the transforms can completely justify their answers by displaying each
- step of the transformation process (use the option Dialogue -> True).
- Besides the examples in the ICASSP '90 paper, [1] try
-
- 1. ASPAnalyze[ t Exp [ - 4 t / 5 ] Cos [ 3 Pi t / 4 ] CStep[t], t ]
- 2. DSPAnalyze[ n (4/5)^n Step[n], n ]
- 3. DSPAnalyze[ (4/5)^n1 Impulse[n1 - n2] Step[n1,n2], {n1,n2} ]
- 4. ASPAnalyze[ Exp[- 4 t1 / 50] Delta[t1 - t2] CStep[t1,t2], {t1,t2} ]
- 5. DSPAnalyze[ (1/2)^n1 (2/5)^n2 Multinomial[n1,n2] Step[n1,n2], {n1,n2} ]
-
- Note that the analog analyzer (ASPAnalyze) only displays the interesting
- section of magnitude and phase plots (part encompassing the breakpoints).
- Also, note that two-dimensional pole-zero plots are actually root maps,
- unless the two-dimensional transform is separable (then two pole-zero
- plots will be displayed). Note that
-
- a. Delta is the Dirac delta function,
- b. Impulse is the unit Kronecker delta function, and
- c. Mathematica's Laplace transform is Laplace whereas mine is LaPlace.
-
- The paper entitled "Symbolic Transforms with Applications to Signal
- Processing"[2] gives Mathematica's output for four of the examples above.
-
-
- ----> Transform Capabilities
-
- Fourier, Laplace and z-transforms are useful for analyzing linear
- systems and signal processing operations. We have implemented packages
- for all the transforms commonly used in signal processing:
-
- (discrete signals) z-transform
- discrete-time Fourier transform
- discrete Fourier transform
-
- (continuous signals) Laplace transform
- Fourier transform
-
- This implementation of the transforms is very general in that multi-
- dimensional versions. The packages also track properties of the trans-
- forms, so it is also possible to deduce the stability or instability of
- a linear system. Using the transforms, the packages can solve
- linear constant-coefficient difference and differential equations
- for right-sided (defined for t > t0) and left-sided (defined for t < t0)
- functions.
-
-
- ---> Knowledge Representation for Signals and Systems
-
- We have added many functions (signal primitives) and operators
- (system primitives) that are common in signal processing and linear
- systems theory but missing in Mathematica:
-
- (basic signals) Kronecker impulse, Dirac delta, sinc,
- continuous and discrete step functions,
- continuous and discrete pulse functions,
- aliased sinc, filter representations
-
- (basic operators) aliasing, convolution, DFT, DTFT, backward
- difference, downsampling, Fourier transform,
- interleave samples, Laplace transform,
- periodic, reverse, scale axis, shift,
- summation, upsampling
-
- The transform packages support all of these new objects.
-
-
- ---> Other Abilities of These Packages
-
- (continuous signals) analog 1-D filter design
- 1-D piecewise convolution
- plots of 1-D and 2-D signals
-
- (discrete signals) 1-D convolution
- plots of 1-D and 2-D sequences
-
- (general plotting) pole-zero diagrams
- root loci
- frequency responses
-
-
- ---> Signal Processing Notebooks
-
- In order to extend the use of these extensions in the educational
- environment, we have written several Notebooks on subjects that are
- studied in transform theory and signal processing courses:
-
- (tutorial Notebooks) z-transform (in three parts)
- piecewise convolution
- analog filter design
- discrete-time Fourier transform
-
- (directed help/guide) signal processing examples
- introduction to Mathematica and SP packages
- Mathematica as an educational tool
- Laplace transform
-
- (reference guide) signal processing usage information
-
- In the tutorial Notebooks, we give numerous examples such as might be
- found in a standard textbook and solve problems that are at the level
- of elementary homework problems. We use the Notebook's animation
- ability whenever possible. In the analog filter design Notebook, for
- example, we illustrate the dependence of the filter's magnitude
- response on the filter order (and elsewhere on the ripple
- control parameter) as an animation sequence.
-
-
- --> Hierarchical Relationship Between Files
-
- The Mathematica packages are grouped OORBP
- into four categories: supporting routines, / \
- digital signal processing packages (DSPRBP), DSPRBP ASPRBP
- analog signal processing packages (ASPRBP), \ /
- and object-oriented extensions (OORBP). SUPPORT
- The supporting routines are maintained
- in six files (as shown on the right). These
- are kept in the Mathematica package directory TransSupport.m S
- SignalProcessing/Support. "SupCode.m" defines Convolution.m | U
- general purpose Mathematica routines like | -----+----- P
- Second, SeriesQ, ToList, GenerateCode, and | | | P
- PrintIt (which sends Mathematica output to a | | ROC.m O
- a PostScript printer). The file "SigProc.m" | | | R
- establish the representation of common signal | FilterSupport.m | T
- processing operators (like Upsample, Shift, | / |
- and Convolve), as well as common signal pro- SigProc.m |
- cessing functions (like Step, CStep, Impulse, | |
- Delta, and Sinc). "ROC.m" defines routines to -----+----------
- extract and combine regions of convergence |
- (ROC's), where an ROC is one open interval of SupCode.m
- points. The file "FilterSupport.m" defines
- filter objects like IIR, FIR, and IIRFunction,
- as well as filter types like Butterworth and Elliptic. The remaining file
- is "TransSupport.m" which provides a general set of routines to aid in the
- writing of transformation rule bases, extends Mathematica's graphics capa-
- bilities (to include magnitude/phase responses, pole-zero diagrams, root-
- loci), and defines tools for stability analysis LSI systems. The file
- "Convolution.m" defines one-dimensional piecewise discrete and continuous
- convolution.
- The digital signal processing routines are maintained in the
- hierarchy shown on the next page. These files are maintained in the Mathe-
- matica package directory under SignalProcessing/Digital. Most files in
- the DSPRBP rely on the forward and inverse z-transform capabilities in
- "ZTransform.m" and "InvZTransform.m", respectively, which in turn depend
- on the file "ZSupport.m". "ZSupport.m" defines the z-transform object,
- supporting routines for rule writing, and checking for valid transforms.
- The files "DTFT.m" and "DFT.m" contain the rules for the discrete-time
- Fourier transform and the discrete Fourier transform, respectively. The
- file "DSPAnalyze.m" provides a powerful analyzer of one- and two-
- dimensional signals generated by linear, shift-invariant systems. This
- routine graphs a signal in the time-domain, prints out its z-transform,
- indicates conditions for the sequence to be stable, displays its pole-zero
- diagram, gives its DTFT, and plots its magnitude and phase responses. The
- package "ZSolve.m" provides the ability to solve linear, constant coef-
- ficient difference equations.
-
- |
- ----------+-------+---------
- | | |
- DSPAnalyze.m DFT.m | | D
- | | | | I
- -----------+ | | G
- | | | I
- DTFT.m ZSolve.m Correlation.m T
- | | | A
- -----------+ --+-----------------+------ L
- | | | |
- | ZTransform.m InvZTransform.m
- | | |
- | ---------------------------
- | |
- DSupport.m ZSupport.m
- | |
- ----------------------------------
- |
-
- The analog signal processing packages are arranged in a similar
- manner, as shown below. "LaPlace.m" and "InvLaPlace.m" provide the forward
- and inverse Laplace transforms, which are able to transform expressions
- involving signal processing operators and functions. Note that the Laplace
- transform extensions released by Wolfram Research only do one-dimensional,
- one-sided transforms and are biased toward higher order mathematical
- functions (which are common in physics). Ours work for multidimensional,
-
-
- ASPAnalyze.m
- | |
- | Fourier.m LSolve.m A
- | | | N
- | ----+-------------+---- A
- | | | L
- LaPlace.m InvLaPlace.m O
- | | G
- --------+------------------
- |
- FilterDesign.m LSupport.m
- | |
-
- multi-sided functions and, therefore, track the region of convergence.
- ASPAnalyze provides the same capabilities as does the DSPAnalyze.
- The top layer is not yet included with the signal processing
- packages. It implements properties of signals and systems, including
- routines that reason about them. Because this code implements some of the
- work of Gary Kopec, Cory Myers, and Michele Covell, we originally called
- it the object-oriented signal processing packages, which is a misnomer
- because Mathematica is object-oriented. Anyway, the files "Signal.m" and
- "System.m" provide signal and system definitions, respectively. Since
- Mathematica is formula-based, it can compute signal values in a point-by-
- point fashion. These new packages add array-based, stream-based, and state
- machine-based signals. This will eventually allow simulation of a wide
- variety of signals and systems.
-
-
- ---> Alteration of Standard Mathematica Routines
-
- 1. the first argument to ClearAttributes and SetAttributes is held,
- 2. the determinant Det of a number is that number, and
- 3. the dot product (Dot) of two numbers is their product.
-
-
- ---> Disclaimer and Future Releases
-
- This software is the property of the Georgia Tech Research Cor-
- poration. We have signed a licensing agreement with Wolfram Research Inc.
- (WRI) so that WRI can distribute the extensions. The Mathematica Journal
- also has the rights to distribute an earlier version of the packages.
- I would like to know if you find bugs in it. I have stopped
- mailing new releases since I post updated code in anonymous FTP locations.
-
- Brian L. Evans and James H. McClellan
- Georgia Tech, School of Electrical Engineering, Atlanta, GA 30332-0250
- USENET: ...!{allegra,hplabs,ulysses}!gatech!eedsp!evans
- INTERNET: evans@eedsp.gatech.edu
-
-
- ---> Suggestion
-
- Please, please, use lower case one-letter symbols as variables
- and do not assign values to them. This includes variables like n, t, x,
- and y, as well as t1, t2, etc. Use one-letter upper case variables to
- represent constants (A, G,...), although Mathematica reserves I and N and
- we reserve L and Z.
-
-
- ---> Documentation
-
- Most of the documentation is in Notebook format. Since many users
- do not have access to the Notebook interface, I have also include two
- LaTeX files: "usage.tex" (reference guide) and "usersguide.tex". Another
- option is to find a Macintosh computer and acquire MathReader (from the
- anonymous FTP sub-directory) which is a public domain Notebook reader.
- MathReader will at least allow you to peruse Notebooks but you will not
- be able to evaluate any code fragments.
-
-
- ---> References on the Signal Processing Packages
-
- 1. Evans, Brian, James McClellan, and Wallace McClure. "Symbolic Trans-
- forms Using DSP Knowledge Bases", Proc. of the 1990 IEEE Inter. Conf.
- on Acoustics, Speech, and Signal Processing. pp. 1775-1778.
-
- 2. Evans, Brian, James McClellan, and Wallace McClure. "Symbolic Trans-
- forms with Applications to Signal Processing". Mathematica Journal.
- vol. 1, issue #2. Dec., 1990. pp 70-80.
-
- 3. Evans, Brian, and James McClellan. "Transforms for Signal Processing".
- 1991 Mathematica Conference. Jan., 1991.
-
- ---> References on the Signal Processing Packages and Notebooks
-
- 4. Evans, Brian, James McClellan, and Kevin West. "Mathematica as an
- Educational Tool for Signal Processing". Proc. IEEE Southeastern
- Conference (Southeastcon). April, 1991. pp. 1162-1166.
-
- 5. Evans, Brian, and James McClellan. "Symbolic Analysis of Signals and
- Systems", ch. 3 of Symbolic and Knowledge-Based Signal Processing ed.
- by Alan Oppenheim and Hamid Nawab. Prentice Hall, Englewood Cliffs
- (NJ), May, 1992.
-
- 6. Evans, Brian, Lina Karam, Kevin West, and James McClellan. "Learning
- Signals and Systems with Mathematica." IEEE Transactions on Education
- Feb. 1993
-
- ---> References on Transforms
-
- 7. Clements, Mark, and Jerrold Pease. 1989. "On Causal Linear Phase IIR
- Digital Filters," IEEE Transactions on Acoustics, Speech, and Signal
- Processing, vol. ASSP-37, issue #4, pp. 479-484.
-
- 8. Churchill, Ruel. 1958. Operational Mathematics. McGraw-Hill, New York.
-
- 9. Dudgeon, Dan, and Russel Mersereau. 1984. Multidimensional Digital
- Signal Processing. Prentice Hall, Englewood Cliffs (NJ).
-
- 10. Muth, Eginhard. 1978. Transform Methods. Prentice Hall, Englewood
- Cliffs (NJ).
-
- 11. Oberhettinger, Fritz, and Larry Badii. 1973. Tables of Laplace Trans-
- forms. Springer-Verlag, New York.
-
- 12. Oppenheim, Alan and Alan Willsky. 1983. Signals and Systems. Prentice
- Hall, Englewood Cliffs (NJ).
-
- 13. Oppenheim, Alan, and Ronald Schafer. 1989. Discrete-Time Signal Pro-
- cessing. Prentice Hall, Englewood Cliffs (NJ).
-
- ---> References on Symbolic Signal Processing
-
- 14. Covell, Michele. 1989. An Algorithm Design Environment for Signal Pro-
- cessing. Ph.D. Thesis and RLE Tech. Rep. #549. MIT, Cambridge (MA).
-
- 15. Kopec, Gary. 1980. "The Representation of Discrete-Time Signals and
- Systems in Programs." Ph.D. Thesis. MIT, Cambridge (MA).
-
- 16. Kopec, Gary. 1985. "The Signal Representation Language SRL." IEEE
- Trans. on Acoustics, Speech, and Signal Processing, vol. ASSP-33,
- issue #4, pp. 921-932.
-
- 17. Myers, Cory S. 1986. "Signal Representation for Symbolic and Numeric
- Processing" Ph.D. Thesis and RLE Tech. Rep. #521. MIT, Cambridge, MA.
-
- 18. Oppenheim, Alan, and Hamid Nawab, eds. {Symbolic and Knowledge-Based
- Signal Processing}. Prentice Hall: Englewood Cliffs, NJ. 1992.
-
-